import algorithm

using
  triangle: openArray[int]

proc isTriangle(triangle): bool =
  triangle[0] != 0 and triangle[0] + triangle[1] > triangle[2]

proc isEquilateral*(triangle): bool = 
  let norm = sorted triangle
  isTriangle(norm) and norm[0] == norm[2]

proc isIsosceles*(triangle): bool =  
  let norm = sorted triangle
  isTriangle(norm) and (norm[0] == norm[1] or norm[1] == norm[2])

proc isScalene*(triangle): bool = 
  let norm = sorted triangle
  isTriangle(norm) and norm[0] != norm[1] and norm[1] != norm[2]
